﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class User_ChangePsw : System.Web.UI.Page
{
    protected string ownpassword;
    protected void Page_Load(object sender, EventArgs e)
    {
        
         if (Session["userName"] != null)
        {
            SQL sql = new SQL();
            ownpassword = sql.getDataFormTable("password", "reader_info", "readerid", Session["userName"].ToString(), "", "", "", "", 1);
         }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "";
        if (or.Text.Equals(ownpassword))
        {
            if (new1.Text.Equals(new2.Text))
            {
                if (!new1.Text.Equals(ownpassword))
                {
                    SQL sql = new SQL();

                }
                else
                {
                    Label1.Text = "不得和原密码相同";
                }
            }
            else
            {
                Label1.Text = "两次输入不一致";
            }

        }
        else
        {
            Label1.Text = "原密码不正确";
        }

    }
}